<div class="row">
    <div class="col-md-8 col-xs-12 col-sm-8">
        <div class="row">
            <h2 class="title text-center"><?php echo $pageTitle; ?></h2>
            <div class="col-md-12 col-xs-12" id="shop-list">
                <div class="row">
                    <div class="col-md-12 col-xs-12 mgt5">
                        <div class="pull-right"><?php echo $pagingBar; ?></div>
                    </div>
                    <div class="clearfix"></div>
                    <?php foreach($aShop as $shop) { ?>
                    <div class="col-xs-12 col-md-4 col-sm-4 product-col">
                    	<div class="product-image-wrapper">
                    		<div class="single-products">
                    			<div class="productinfo text-center">
                                    <p class="product-item-wrap">
                                        <a href="<?php echo shop_url($shop->slug); ?>" title="<?php echo $shop->getTitle(); ?>">
                                            <?php if($shop->banner!='') { ?>
                                            <img class="media-object shop-item lazy" src="<?php echo assets('images/blank.gif', true); ?>" data-src="<?php echo banner_upload($shop->banner, $shop->image_folder); ?>" />
                                            <?php } else { ?>
                                            <img class="media-object shop-item lazy" src="<?php echo assets('images/blank.gif', true); ?>" data-src="http://placehold.it/150x75&text=Logo" />
                                            <?php } ?>
                                        </a>
                                    </p>
                                    <div class="product-info-wrap">
                                        <h3 class="item-title" title="<?php echo $shop->getTitle(); ?>"><?php echo substr($shop->getTitle(), 0, 20); ?></h3>
                                    </div>
                                    <a href="<?php echo shop_url($shop->slug); ?>" class="btn btn-default add-to-cart clear-mgr" title="<?php echo $shop->getTitle(); ?>">
                                        <i class="fa fa-external-link-square"></i>Xem
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <?php } ?>
                </div>
            </div>
        </div>
    </div>
    <div class="col-md-4 col-xs-12 col-sm-4 mgt10">
        <?php
        $aSegment = $this->uri->segment_array();
        if(!isset($aSegment[2])){
            $aSegment[2] = '';
            $aSegment[3] = '';
        } else {
            if($aSegment[2]!='c'){
                $aSegment[3] = '';
            }
        }
        ?>
        <div class="list-group clear-radius" id="shop-category-list" data-count="<?php echo page_url(SHOP_SLUG_NEW.'/count'); ?>">
            <?php foreach($aCategories as $index=>$cate) { ?>
            <?php
            $activeClass = '';
            $activeIcon = '';
            $activeLink = '';
            if($aSegment[3]==$cate->getSlug()){
                $activeClass = 'active';
                $activeIcon = "<i class='glyphicon glyphicon-chevron-right'></i>&nbsp;";
                $activeLink = '#';
            } else {
                $activeLink = page_url(SHOP_SLUG_NEW . '/c/' . $cate->getSlug());
            }
            ?>
            <a href="<?php echo $activeLink; ?>" class="list-group-item <?php echo $activeClass; ?> clear-radius">
                <span> <?php echo $activeIcon . $cate->getTitle(); ?>&nbsp;</span>
                <span id="item-<?php echo $index; ?>" class="badge need-get-shop-cate" data-item="item-<?php echo $index; ?>" data-id="<?php echo $this->encrypt->encode($cate->getId()); ?>"></span>
            </a>
            <?php } ?>
        </div>
    </div>
</div>